﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Client_Web.ServiceReference;

namespace Client_Web.Gallery
{
    public partial class AlbumAdd : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (null == Session["userIdStr"])
            {
                Response.Redirect("~/Default.aspx");
            }
        }

        protected void AddAlbum_Click(object sender, EventArgs e)
        {
            if (null != Session["userIdStr"])
            {
                ServiceClient serviceClient = new ServiceClient();
                serviceClient.addAlbum(AlbumName.Text, (string)Session["userIdStr"]);
                Response.Redirect("~/Gallery/AlbumList.aspx");
            }
        }
    }
}